package com.lej.dataservice.club.bean.main.home

/**
 *  author: cjq
 *  date  : 2022/6/14 0014
 *  desc  :
 *  {
"code": "",
"msg": "",
"data": {
"id": "nft_id",
"nick": "创作者昵称",
"uid": "创作者uid",
"avatar": "创作者头像",
"bio_text": "创作者简介",
"title": "nft标题",
"cover": "nft封面",
"issue_num": "发行量",
"descripe": "nft简介",
"is_discount": "是否有优惠1有，0没有",
"discount_per_fee": "优惠后价格单位分",
"per_fee": "原价单位分",
"created_at": "",
"is_have": "1有该nft，0没有",
"photo_frame": "带相框的封面",
"material": "材质",
"extra_belong_to": "是否是头像1是0不是",
"is_external": "是否外部铸造的1外部，0内部",
"introduction": "作品简介",
"is_box_open": "是否盲盒御守nft0不是1是"
"in_stock":0 库存 0已售罄
is_goods 0只展示不能购买1可以购买
descripe_img 作品故事
resource nft对应类型地址 app中gif图从这获取
resource_type nft类型：1 图片 2 音频 3 视频 4 3D
have_right 1有权益，0没权益
}
}
 */
data class NftDetailInfo(
    val id: Int?,
    val nick: String?,
    val uid: Int?,
    val avatar: String?,
    val bio_text: String?,
    val title: String?,
    val cover: String?,
    val issue_num: Int?,
    val descripe: String?,
    val is_discount: Int?,
    val discount_per_fee: Int?,
    val per_fee: Int?,
    val created_at: String?,
    val is_have: Int?,
    val photo_frame: String?,
    val material: String?,
    val extra_belong_to: Int?,
    val is_external: Int?,
    val introduction: String?,
    val is_box_open: Int?,
    val in_stock: Int?,
    val descripe_img: String?,
    val is_goods: Int?,
    val resource:String?,
    val resource_type:String?,
    val gif_image:NftDetailImage?,
    val have_rights:Int?
) {
    fun isExit() = in_stock != null && in_stock > 0
    fun isCanBuy() = is_goods != null && is_goods > 0
    fun isRight() = have_rights == 1
}
